<?php
//幻灯片
namespace Admin\Model;
use Think\Model;

class focusModel extends Model{
    
    protected $tableName = 'focus';

    /**
     * 自动完成
     * @var array
     */
    protected $_auto = array(
    );
    

    /*
     * 自动验证
     */
    protected $_validate = array(
     );
    
    
    /*
     * 获取列表,部分已
     */
    public function getFocusLists($where){
        $res = $this->where($where)->order("status DESC,ord ASC")->select();
        return $res;
    }
    
	
    /*
     * 统计数量
     */
    public function getFocusCount($where){
        $res = $this->where($where)->count();
        return $res;
    }
    
    /*
     * 添加
     */
    public function addFocus($data){
        $res = $this->add($data);
        return $res;
    }
    
    /*
     * 获取信息
     */
    public function getFocus($where){
        $res = $this->where($where)->find();
        return $res;
    }
	
    /*
     * 编辑信息
     */
    public function editFocus($where,$data){
        return $this->where($where)->save($data);
    }
    
    
}
